import React from 'react'
import ThemeContext from './context/theme-context'
export default function HomeBanner() {
  return (
    <div>HomeBanner

        {/* 函数式组件中使用Context共享数据 */}
        <ThemeContext.Consumer>
            {
                value=>{
                    return <h2>{value.color}</h2>
                }
            }
        </ThemeContext.Consumer>
    </div>
  )
}
